"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const tiny_entity2_1 = require("tiny-entity2");
const EntityObjectType = tiny_entity2_1.EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
let Modifier = class Modifier extends EntityObjectType {
};
__decorate([
    tiny_entity2_1.Define.PrimaryKey(),
    __metadata("design:type", String)
], Modifier.prototype, "id", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.VARCHAR,
        NotAllowNULL: true
    }),
    __metadata("design:type", String)
], Modifier.prototype, "name", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.VARCHAR,
        IsIndex: true
    }),
    __metadata("design:type", String)
], Modifier.prototype, "productId", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.VARCHAR,
    }),
    __metadata("design:type", String)
], Modifier.prototype, "modifierStoreId", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.VARCHAR,
        NotAllowNULL: true
    }),
    __metadata("design:type", String)
], Modifier.prototype, "rule", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.BOOL
    }),
    __metadata("design:type", Boolean)
], Modifier.prototype, "required", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.INT
    }),
    __metadata("design:type", Number)
], Modifier.prototype, "index", void 0);
__decorate([
    tiny_entity2_1.Define.Mapping({
        Mapping: 'ModifierOption',
        MappingKey: 'modifierId'
    }),
    __metadata("design:type", Array)
], Modifier.prototype, "modifierOptions", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.VARCHAR,
        NotAllowNULL: true,
        IsIndex: true
    }),
    __metadata("design:type", String)
], Modifier.prototype, "storeId", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.BIGINT
    }),
    __metadata("design:type", Number)
], Modifier.prototype, "createTime", void 0);
__decorate([
    tiny_entity2_1.Define.Column({
        DataType: tiny_entity2_1.Define.DataType.BIGINT
    }),
    __metadata("design:type", Number)
], Modifier.prototype, "version", void 0);
Modifier = __decorate([
    tiny_entity2_1.Define.Table({ TableName: 'modifier' })
], Modifier);
exports.Modifier = Modifier;
const ModifierRule = {
    Single: 'single',
    Multi: 'multi'
};
